<include file="./Tpl/Home/Header.html" />
<link href="/Public/Home/bootstrap.min.css?v=3.4.0" rel="stylesheet">
<script src="/Public/Home/bootstrap.min.js?v=3.4.0"></script>
<!-- jQuery Validation plugin javascript-->
<script src="/Public/js/jquery.validate.min.js"></script>
<script src="/Public/js/messages_zh.min.js"></script>
<script src="/Public/js/base.js"></script>
<style type="text/css">
.user {
	width: 97%;
	margin: 0px auto;
}
.error{ color:#C00}
.user-nav {
}
.user-nav a {
	display: inline-block;
	float: left;
	padding: 7px 20px;
	margin-left: 10px;
	color: #0B72A4;
}
.user-nav a.cur {
	background: #fff;
	border: 1px solid #ddd;
	border-bottom: 0px;
}
.user-info {
	padding: 20px 0px;
	font-size: 14px;
	border: 1px solid #ddd;
}
.user-info dl {
	display: block;
	width: 99%;
	margin: 0px auto;
	zoom: 1;
	overflow: hidden;
}
.user-info dl dt, .user-info dl dd {
	float: left;
	padding: 15px 10px;
}
.user-info dl dt {
	clear: both;
	width: 10%;
}
.user-info dl dd {
	width: 70%;
}
.user-info dl dd input[type='radio'] {
	margin-left: 20px;
}
.user-info input[type='text'], .user-info input[type='password'] {
	width: 300px;
	height: 30px;
	line-height: 30px;
	padding: 0px 10px;
	border: 1px solid #ccc;
}
.user-info table {
	width: 100%;
	border: 1px solid #ccc;
	border-bottom: 0px;
}
.user-info th, .user-info td {
	padding: 10px 10px;
	border-bottom: 1px solid #ccc;
	text-align: right;
}
.user-info h3 {
	text-indent: 15px;
	padding: 15px 0px;
}
.sub {
	display: inline-block;
	font-weight: 700;
	font-size: 14px;
	color: white;
	text-align: center;
	width: 170px;
	height: 32px;
	line-height: 32px;
	background: #FF8C19;
	margin-top: 10px;
}
.sub:hover {
	color: #fff;
	text-decoration: none;
}
.Tentitle span{background:none repeat scroll 0 0 #ffffff; border-left:1px solid #c3c1c1; border-right:1px solid #c3c1c1; border-top:2px solid #329ddc; color:#329ddc; padding:6px 10px 5px;}
</style>
<div class="marketArea clear"> <include file="./Tpl/Home/Left.html" />
  <div class="rightArea">
    <input id="messageType" type="hidden" value="0">
    <div class="entrustTen">
      <div class="Tentitle"> <span class="lightblue4">安全中心</span> </div>
    </div>
    <div style="width:780px;display:inline-block;">
      <div class="coinBox lasttenorder2">
        <div style="width:757px;margin:0px auto;" class="riskArea"> <span class="icon"></span> <span style="width:650px;" class="hinttext"> <span class="define">重要提示:</span>客服不会要求用QQ远程控制您的电脑,所有要求远程的都是<strong class="red bold">骗子</strong>。<strong class="red">短信验证码非常重要，请勿透露给任何人，包括客服</strong>。 </span> </div>
        <div class="coinBoxBody2">
          <div class="coinbody">
            <div class="coinleft"> <img alt="" src="/Public/Home/sms.gif"> </div>
            <div class="coinright">
              <h4>短信验证码&nbsp;</h4>
              <ul>
                <li class="c-left">
                  <p>执行相关操作时，系统将通过短信将验证码发送到您的手机。</p>
                  <p>免费发送短信
                    不受手机操作系统限制
                    绑定手机号即可开通 </p>
                </li>
				<empty name="user.phone">
                               <li style="float:right;text-align:right;padding-right:10px;"> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal5"> 绑定手机号码 </button> </li>
				<else/> 
				<span>已绑定手机为：{$user.phone}</span>
				
				</empty>

              </ul>
            </div>
          </div>
          <div class="coinbody">
            <div class="coinleft"> <img alt="" src="/Public/Home/lock.png"> </div>
            <div class="coinright">
              <h4>修改登录密码&nbsp;</h4>
              <ul>
                <li class="c-left">
                  <p>修改登录密码，请设置安全系数较高的密码。</p>
                </li>
                         <li style="float:right;text-align:right;padding-right:10px;"> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal7"> 修改登录密码 </button> </li>
              </ul>
            </div>
          </div>
          <div class="coinbody">
            <div class="coinleft"> <img alt="" src="/Public/Home/lock.png"> </div>
            <div class="coinright">
              <h4>修改交易密码&nbsp;</h4>
              <ul>
                <li class="c-left">
                  <p>执行相关操作时，系统将通过短信将验证码发送到您的手机。</p>
                  <p>交易密码是您涉及金额操作的重要保证，请谨慎操作 </p>
                </li>
                <li style="float:right;text-align:right;padding-right:10px;"> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal6"> 修改交易密码 </button> </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="modal inmodal fade in" id="myModal5" tabindex="-1" role="dialog" aria-hidden="false" style="display: none;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
      </div>
      <small class="font-bold">
      <div class="modal-body">
      <div class="row">
                      <form class="form-horizontal m-t" id="signupForm" jump-url="?s=Home/User/setpwd" method="post" action="?s=Home/User/settel">

        <div class="col-md-12">

          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label">手机号码：</label>
            <div class="col-sm-7">
              <input type="text" name="telnum" id="telnum" class="form-control" value="{$user.phone|default=''}" placeholder="请输入手机号码">
            </div>
            </div>
          </div>
          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label">验证码：</label>
            <div class="col-sm-3">
              <input type="text" name="code" class="form-control" placeholder="请输入验证码">
            </div>
            <div class="col-sm-4">
              <input type="button" onclick="telsmg()" id="tel" class="form-control btn btn-info"  data-key='on' value="发送验证码">
            
            </div>
            </div>
          </div>
          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label"></label>
            <div class="col-sm-7">
              <input type="submit" value="提交"  class="btn btn-primary" class="form-control">
            </div>
            </div>
          </div>
        </div>
        </form>
          <script>
			  		var i=120;
					var tid2;
			  		tid2=setInterval(function(){
						if($("#tel").attr("data-key")=='off'){
							$("#tel").attr("disabled",true)
							i--;
							$("#tel").val(i+"秒后可重新发送");
							if(i<=0){
								$("#tel").removeAttr("disabled").val("重新发送验证码");
								$("#tel").attr("data-key","on");
							}
						}
					},1000);
              		function telsmg(){
						var mobile = /^(((13[0-9]{1})|(15[0-9]{1}))+\d{8})$/ 
						i=120;
						$("#tel").attr("data-key","off");
						$.post("/?s=Home/User/tel",{"tel":$("#telnum").val()});
					}
					
					
					
              </script>
              <script>	
			  jQuery.validator.addMethod("mobile", function(value, element) { 
var length = value.length; 
var mobile = /^(((13[0-9]{1})|(15[0-9]{1}))+\d{8})$/ 
return this.optional(element) || (length == 11 && mobile.test(value)); 
}, "手机号码格式错误");
           $("#signupForm").validate({			   
                rules: {
                    telnum: {
                        required: true,
                    },
                    code: {
                        required: true,
                        number:true
                    }
                },
                messages: {
                    telnum: {
                        required: "手机号码不能为空",
                    },
                    code: {
                        required: "验证码不能为空",
                        number: "验证码必须是数字"
                    }
                },
				submitHandler:function(form){
					ajax_submit_form(form)
					return false;
				},
				invalidHandler: function() {  //不通过回调 
					  return false; 
				  },
		   
            });
			</script>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
      </div>
      </small></div>
    <small class="font-bold"> </small></div>
  <small class="font-bold"> </small></div>
  <div class="modal inmodal fade in" id="myModal7" tabindex="-1" role="dialog" aria-hidden="false" style="display: none;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
      </div>
      <small class="font-bold">
      <div class="modal-body">
      <div class="row">
                      <form class="form-horizontal m-t" id="signupForm1" jump-url="?s=Home/User/setpwd" method="post" action="?s=Home/User/setpwdgo">

        <div class="col-md-12">

          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label">原始密码：</label>
            <div class="col-sm-7">
              <input type="password" name="oldpwd" id="oldpwd" class="form-control" placeholder="请输入原密码">
            </div>
            </div>
          </div>
          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label">新密码：</label>
            <div class="col-sm-7">
              <input type="password" name="newpwd" id="newpwd" class="form-control" placeholder="请输入新密码">
            </div>
       
            </div>
          </div>
          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label">重复新密码：</label>
            <div class="col-sm-7">
              <input type="password" name="repwd" class="form-control" placeholder="请输入新密码">
            </div>
           
            </div>
          </div>
          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label"></label>
            <div class="col-sm-7">
              <input type="submit" value="提交"  class="btn btn-primary" class="form-control">
            </div>
            </div>
          </div>
        </div>
        </form>
          
              <script>	
	
           $("#signupForm1").validate({			   
                rules: {
                    newpwd: {
                        required: true,
                    },
                    oldpwd: {
                        required: true,
                    },
					  cnpwd: {
                        required: true,
						equalTo:"#newpwd"
                    }
                },
                messages: {
                    newpwd: {
                        required: "密码不能为空",
                    },
                    oldpwd: {
                        required: '新密码不能为空',
                    },
					  cnpwd: {
                        required: '新密码不能为空',
						equalTo:"两次密码不相同"
                    }
                },
				submitHandler:function(form){
					ajax_submit_form(form)
					return false;
				},
				invalidHandler: function() {  //不通过回调 
					  return false; 
				  },
		   
            });
			</script>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
      </div>
      </small></div>
    <small class="font-bold"> </small></div>
  <small class="font-bold"> </small></div>
  <div class="modal inmodal fade in" id="myModal6" tabindex="-1" role="dialog" aria-hidden="false" style="display: none;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
      </div>
      <small class="font-bold">
      <div class="modal-body">
      <div class="row">
                      <form class="form-horizontal m-t" id="signupForm3" jump-url="?s=Home/User/setpwd" method="post" action="?s=Home/User/setpaypwdgo">

        <div class="col-md-12">

          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label">手机号码：</label>
            <div class="col-sm-7">
              <input type="text" name="telnum" id="telnum2" class="form-control" placeholder="请输入手机号码">
            </div>
            </div>
          </div>
          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label">验证码：</label>
            <div class="col-sm-3">
              <input type="text" name="code" class="form-control" placeholder="请输入验证码">
            </div>
            <div class="col-sm-4">
              <input type="button" onclick="telsmg7()" id="tel2" class="form-control btn btn-info"  data-key='on' value="发送验证码">
            
            </div>
            </div>
          </div>
          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label">新交易密码：</label>
            <div class="col-sm-7">
              <input type="password" name="tpwd" id="tpwd" class="form-control" placeholder="请输入密码">
            </div>
            </div>
          </div>
          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label">重复新交易密码：</label>
            <div class="col-sm-7">
              <input type="password" name="ctpwd" id="ctpwd" class="form-control" placeholder="请输入密码">
            </div>
            </div>
          </div>
          <div class="form-group">
          <div class="row">
            <label class="col-sm-3 control-label"></label>
            <div class="col-sm-7">
              <input type="submit" value="提交"  class="btn btn-primary" class="form-control">
            </div>
            </div>
          </div>
        </div>
        </form>
      <script>
			  		var i=120;
					var tid;
			  		tid=setInterval(function(){
						if($("#tel2").attr("data-key")=='off'){
							$("#tel2").attr("disabled",true)
							i--;
							$("#tel2").val(i+"秒后可重新发送");	
							if(i<=0){
								$("#tel2").removeAttr("disabled").val("重新发送验证码");
								$("#tel2").attr("data-key","on");
							}
						}
					},1000);
              		function telsmg7(){
						alert(i);
						var mobile = /^(((13[0-9]{1})|(15[0-9]{1}))+\d{8})$/ 
						i=120;
						$("#tel2").attr("data-key","off");
						$.post("/?s=Home/User/tel",{"tel":$("#telnum2").val()});
					}
					
					
					
              </script>
              <script>	
			  jQuery.validator.addMethod("mobile", function(value, element) { 
var length = value.length; 
var mobile = /^(((13[0-9]{1})|(15[0-9]{1}))+\d{8})$/ 
return this.optional(element) || (length == 11 && mobile.test(value)); 
}, "手机号码格式错误");
           $("#signupForm3").validate({			   
                rules: {
                    code: {
                        required: true,
                    },
                    tpwd: {
                        required: true,
                        equalTo:"#tpwd"
                    },
					ctpwd: {
                        required: true,
                        number:true
                    }
                },
                messages: {
                
                    code: {
                        required: "验证码不能为空",
                    },
					    tpwd: {
                        required: "密码不能为空",
						mobile:"请填写正确手机号码",
                    },
						ctpwd: {
                        required: "密码不能为空",
                        equalTo:"两次密码不相等"
                    }
                },
				submitHandler:function(form){
					ajax_submit_form(form)
					return false;
				},
				invalidHandler: function() {  //不通过回调 
					  return false; 
				  },
		   
            });
			
			$(".items10").parent("li").addClass("cur");
			$(".bor").eq(2).children("div").addClass("tradeTitlecur").removeClass("tradeTitle");
			$(".bor").eq(2).find("span").addClass("acountManage1cur").removeClass("acountManage1");
			</script>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
      </div>
      </small></div>
    <small class="font-bold"> </small></div>
  <small class="font-bold"> </small></div>
<include file="./Tpl/Home/Footer.html" />